package com.rchat.pocmini.activity.setting;

import com.aso.common.http.delegate.HttpCallbackImpl;
import com.aso.common.http.utils.HttpUtils;
import com.rchat.pocmini.global.HttpCodeGlobal;
import com.rchat.pocmini.global.RequestParam;
import com.rchat.pocmini.global.UrlsGlobal;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by itsdf07 on 2017/8/19.
 */

public class SettingModelImpl implements SettingContract.Model {
    @Override
    public void activate(String qrCode, String userName, HttpCallbackImpl callback) {
        Map<String, String> param = new HashMap<>();
        param.put("qrCode", qrCode);
        param.put("userName", userName);
        //body = {"code":1043,"data":{"platform":1,"version":"1.0","enterprise":1,"userName":"111110000088","qrCode":"12403736743073567"}}
        String body = RequestParam.requestRootParam(HttpCodeGlobal.REQ_CODE_1043, param);
        HttpUtils.postAsyn(UrlsGlobal.getUrl(UrlsGlobal.URL_DEVICE_BLUETOOTH), body, callback);
    }
}
